import java.applet.Applet;
import java.applet.AudioClip;
import java.awt.Graphics;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;

import sun.audio.AudioPlayer;


public class Carillon extends Applet {

	private static final long serialVersionUID = 1L;

	URL suono = null;
	AudioClip clip;
	String msg = new String("");
	
	public void init() {
		try {
			suono = new URL("http://dcdt.ing.unibs.it/~gruppo00/Musica/Carillon.wav");
		}
		catch(Exception e) {System.out.println(e);}
		
		repaint();
		if(suono != null) {
			clip = newAudioClip(suono);
			clip.play();
			msg = "Play";
		}
		else { msg = "errore"; }
		repaint();
	}
	
	public void paint(Graphics g) {
		g.drawString(msg, 100, 100);
	}
}
